# $Id: Makefile,v 1.19 2007/03/13 21:15:15 sby Exp $

.include "../include/mythbbs.mk"

RANLIB	= ranlib

HDR =	dao.h dao.p

SRC =	\
	get_ip_address.c ipv6_dns_ident.c ipv6_dns_name.c \
	\
	is_alnum.c is_alpha.c is_fpath.c not_addr.c \
	\
	dns.c dns_addr.c dns_name.c dns_smtp.c \
	dns_ident.c dns_open.c dns_aton.c \
	\
	str_decode.c \
	str_dup.c \
	str_fpath.c str_lower.c \
	str_passwd.c \
	str_stamp.c str_tail.c str_time.c \
	str_trim.c str_ttl.c str_trim2.c\
	\
	radix32.c \
	\
	f_cat.c f_cp.c f_img.c f_ln.c f_map.c f_mode.c f_mv.c f_pid.c \
	f_open.c f_path.c f_rm.c f_suck.c mak_dirs.c f_lock.c \
	\
	rec_add.c rec_num.c rec_get.c \
	rec_ins.c rec_mov.c rec_put.c rec_apply.c \
	\
	shm.c sem.c\
	\
	dl_lib.c \
	\
	setpf.c strip_ansi.c cut_ansistr.c \
	isprint2.c not_alnum.c not_alpha.c strstr_lower.c \
	nextfield.c bad_user.c file_list_count.c \
	b_suckinfile.c url_encode.c socket.c \
	\
	rfc2047.c

OBJ =	$(SRC:.c=.o)

.c.o:
	$(CCACHE) $(CC) $(CFLAGS) -c $*.c

install: all

all:	libdao.a

dao.p:	$(SRC)
	$(CPROTO) -o $@ $?

libdao.a:	$(OBJ)
	ar rv $@ $?
	$(RANLIB) $@

clean:
	rm -fr $(GARBAGE) $(OBJ) libdao.a *.bak *.BAK *~

tags:
	ctags $(SRC) ../include/*.h

